package com.softjourn.punchcard.activity;

import android.os.Bundle;
import android.view.View;
import android.view.WindowManager;
import android.view.View.OnClickListener;
import android.widget.Button;

import com.actionbarsherlock.app.SherlockActivity;
import com.softjourn.punchcard.R;
import com.softjourn.punchcard.lib.Coder;

public class QRActivity extends SherlockActivity {
	
	@Override
	public void onCreate(Bundle savedInstanceState) {
		
		super.onCreate(savedInstanceState);
		
		setContentView(R.layout.activity_qr);
		
		getWindow().setSoftInputMode(
			      WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
		
		Button btnBack = (Button) findViewById(R.id.btn_qr_back);

		btnBack.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				finish();
			}
		});
		
		String messageQR = getIntent().getStringExtra(QRActivity.class.getCanonicalName());

		new Coder(QRActivity.this).execute(messageQR);
	}
}
